USE [Ejemplos]
GO

/****** Object:  Table [dbo].[Detalle]    Script Date: 05/21/2011 08:48:54 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Detalle](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Id_Maestro] [int] NOT NULL,
	[Nombre] [nchar](30) NOT NULL,
	[Descripcion] [nchar](50) NOT NULL,
 CONSTRAINT [PK_Detalle] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Detalle]  WITH CHECK ADD  CONSTRAINT [FK_Detalle_Maestro] FOREIGN KEY([Id_Maestro])
REFERENCES [dbo].[Maestro] ([Id])
GO

ALTER TABLE [dbo].[Detalle] CHECK CONSTRAINT [FK_Detalle_Maestro]
GO


